package com.itheima;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

public class LocalDatetimeDemo02 {
    public static void main(String[] args) {
    //    2.2根据指定日期/时间创建对象

    //    入参一次是是年，月，日
        LocalDate localDate = LocalDate.of(2020, 12, 24);
        //2020-12-24
        // System.out.println(localDate);
        //入参是时分秒
        LocalTime localTime = LocalTime.of(23, 24, 8);
        //23:24:08
        // System.out.println(localTime);
        //入参是年月日，时分秒，纳秒
        LocalDateTime localDateTime = LocalDateTime.of(2020, 11, 18, 23, 26, 18);
        //2020-11-18T23:26:18
        System.out.println(localDateTime);


    }
}
